<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>分销设置</title>
    {template 'stourtravel/public/public_js'}
    {php echo Common::getCss('style.css,base.css,base_new.css'); }
    {php echo Common::getScript('config.js,ajaxform.js');}
    {php echo Common::getScript("uploadify/jquery.uploadify.min.js"); }
    {php echo Common::getCss('uploadify.css','js/uploadify/'); }
    <style>
       .ratio-sp{
           float:left;
           line-height: 24px;
           margin-left:3px;
       }
       .hint-sp{
           float:left;
           margin-left:15px;
           line-height: 24px;
           height:24px;
           color:#acacac;
       }
       .ver-item{
           float:left;
           margin-right: 10px;
       }
       .wx-tit{
           width:80px;
           text-align: right;
       }
    </style>
</head>

<body>
	<table class="content-tab">
    <tr>
    <td width="119px" class="content-lt-td"  valign="top">
     {template 'stourtravel/public/leftnav'}
    <!--右侧内容区-->
    </td>
     <td valign="top" class="content-rt-td">
        <!--面包屑-->
         <form method="post" name="product_frm" id="product_frm">
             <div class="manage-nr">
             	<div class="cfg-header-bar">
             		<a href="javascript:;" class="fr btn btn-primary radius mt-6 mr-10" onclick="window.location.reload()">刷新</a>
             	</div>
                 
                 <!--基础信息开始-->
                 <div class="product-add-div">
                 	<ul class="info-item-block">
                 		<li>
                 			<span class="item-hd" style="width: 140px !important;">跳过分销商申请步骤：</span>
                 			<div class="item-bd">
                 				<label class="radio-label mr-20"><input name="cfg_fenxiao_orderautopassed" {if $info['cfg_fenxiao_orderautopassed']==1}checked="checked"{/if} type="radio" value="1"/>开启</label>
                 				<label class="radio-label mr-20"><input name="cfg_fenxiao_orderautopassed" {if $info['cfg_fenxiao_orderautopassed']==0}checked="checked"{/if} type="radio" value="0"/>关闭</label>
                 				<span class="item-text c-999">*开启时，通过分销链接进入网站的会员，无须申请自动成为分销商；关闭时，新会员需要申请才能成为分销商</span>
                 			</div>
                 		</li>
                 		<li id="autoverify_con" {if  $info['cfg_fenxiao_orderautopassed']==1}style="display:none"{/if}>
                 			<span class="item-hd" style="width: 140px !important;">分销商自动审核开关：</span>
                 			<div class="item-bd">
                 				<label class="radio-label mr-20"><input name="cfg_fenxiao_autoverify" {if $info['cfg_fenxiao_autoverify']==1}checked="checked"{/if} type="radio" value="1"/>开启</label>
                 				<label class="radio-label mr-20"><input name="cfg_fenxiao_autoverify" {if $info['cfg_fenxiao_autoverify']==0}checked="checked"{/if} type="radio" value="0"/>关闭</label>
                 				<span class="item-text c-999">*开启：会员申请成为分销商，系统自动通过。关闭：需要后台管理人员进行分销商审核通过</span>
                 			</div>
                 		</li>
                 		<li>
                 			<span class="item-hd" style="width: 140px !important;">分销商自动冻结开关：</span>
                 			<div class="item-bd">
                 				<label class="radio-label mr-20"><input name="cfg_fenxiao_autofreeze" type="radio" {if $info['cfg_fenxiao_autofreeze']==1}checked="checked"{/if} value="1"/>开启</label>
                 				<label class="radio-label mr-20"><input name="cfg_fenxiao_autofreeze" type="radio" {if $info['cfg_fenxiao_autofreeze']==0}checked="checked"{/if} value="0"/>关闭</label>
                 				<span class="lh-30 ml-10">超过 <input type="text" class="input-text w50" style="float:none" name="cfg_fenxiao_freeze_duration" value="{$info['cfg_fenxiao_freeze_duration']}"/> 个小时未登录分销商中心，则自动冻结该分销商。</span>
                 			</div>
                 		</li>
                 		<li>
                 			<span class="item-hd" style="width: 140px !important;">分销模式：</span>
                 			<div class="item-bd">
                 				<label class="radio-label mr-20"><input name="cfg_fenxiao_level_num" {if $info['cfg_fenxiao_level_num']==2}checked="checked"{/if} type="radio" value="2"/>二级</label>
                 				<label class="radio-label mr-20"><input name="cfg_fenxiao_level_num" {if $info['cfg_fenxiao_level_num']!=2}checked="checked"{/if} type="radio" value="3"/>三级</label>
                 				<span class="item-text c-999">*默认显示三级分销；选择两级分销时，默认关闭间接下级分销商的显示一级三级分销的返佣设置项</span>
                 			</div>
                 		</li>


                        <li>
                            <span class="item-hd" style="width: 140px !important;">显示端（抖音小程序）：</span>
                            <div class="item-bd">
                                <label class="radio-label mr-20"><input name="cfg_fenxiao_ishow_dy" type="radio" {if $info['cfg_fenxiao_ishow_dy']==1}checked="checked"{/if} value="1"/>开启</label>
                                <label class="radio-label mr-20"><input name="cfg_fenxiao_ishow_dy" type="radio" {if $info['cfg_fenxiao_ishow_dy']==0}checked="checked"{/if} value="0"/>关闭</label>
                            </div>
                        </li>

                        <li>
                            <span class="item-hd" style="width: 140px !important;">显示端（微信小程序）：</span>
                            <div class="item-bd">
                                <label class="radio-label mr-20"><input name="cfg_fenxiao_ishow_wx" type="radio" {if $info['cfg_fenxiao_ishow_wx']==1}checked="checked"{/if} value="1"/>开启</label>
                                <label class="radio-label mr-20"><input name="cfg_fenxiao_ishow_wx" type="radio" {if $info['cfg_fenxiao_ishow_wx']==0}checked="checked"{/if} value="0"/>关闭</label>
                            </div>
                        </li>

                        <li>
                            <span class="item-hd" style="width: 140px !important;">显示端（h5）：</span>
                            <div class="item-bd">
                                <label class="radio-label mr-20"><input name="cfg_fenxiao_ishow_h5" type="radio" {if $info['cfg_fenxiao_ishow_h5']==1}checked="checked"{/if} value="1"/>开启</label>
                                <label class="radio-label mr-20"><input name="cfg_fenxiao_ishow_h5" type="radio" {if $info['cfg_fenxiao_ishow_h5']==0}checked="checked"{/if} value="0"/>关闭</label>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd" style="width: 140px !important;">默认分销状态{Common::get_help_icon('cfg_main_fenxiao_status')}：</span>
                            <div class="item-bd">
                                <label class="radio-label mr-20"><input name="cfg_main_fenxiao_status" type="radio" {if $info['cfg_main_fenxiao_status']==1}checked="checked"{/if} value="1"/>开启</label>
                                <label class="radio-label mr-20"><input name="cfg_main_fenxiao_status" type="radio" {if $info['cfg_main_fenxiao_status']==0}checked="checked"{/if} value="0"/>关闭</label>
                            </div>
                        </li>
                        <li>
                            <span class="item-hd" style="width: 140px !important;">批量分销开关{Common::get_help_icon('cfg_main_fenxiao_status')}：</span>
                            <div class="item-bd">
                                <label class="radio-label mr-20"><input name="cfg_main_fenxiao_status_batch" type="radio" {if $info['cfg_main_fenxiao_status_batch']==1}checked="checked"{/if} value="1"/>开启</label>
                                <label class="radio-label mr-20"><input name="cfg_main_fenxiao_status_batch" type="radio" {if $info['cfg_main_fenxiao_status_batch']==0}checked="checked"{/if} value="0"/>关闭</label>
                            </div>
                        </li>
                 	</ul>
                     
                 </div>
                <div class="clear clearfix pt-20 pb-20">
                    <a class="btn btn-primary radius size-L ml-115" id="btn_save" href="javascript:;">保存</a>
                </div>
                 
             </div>
             <input type="hidden" name="id" id="rankid" value="1">
         </form>
  </td>
  </tr>
  </table>


  
  
	<script>

	$(document).ready(function(){

        $("input[name=cfg_fenxiao_orderautopassed]").click(function(){
              var val=$(this).val();
              if(val==1)
              {
                  $("input[name=cfg_fenxiao_autoverify][value=1]").trigger('click');
                  $("#autoverify_con").hide();
              }
              else
              {
                  $("#autoverify_con").show();
              }
        });

        //配置信息保存
        $("#btn_save").click(function(){
            $.ajaxform({
                url   :  SITEURL+"fenxiao/admin/config/ajax_config_save",
                method  :  "POST",
                isUpload :  true,
                form  : "#product_frm",
                dataType: "JSON",
                success  :  function(data, opts)
                {
                    if(data.status)
                    {
                        ST.Util.showMsg('保存成功!','4',2000);
                    }
                    else
                    {
                        ST.Util.showMsg(data.msg,'5',2000);
                    }
                }
            });
        })
     });
    </script>

</body>
</html>
